package com.smrs.basicdata.model;

import java.util.Date;
import java.util.LinkedHashSet;
import java.util.Set;

import com.smrs.model.BaseModel;
import com.smrs.security.model.UserModel;

public class StoreModel extends BaseModel<Long>{
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	private String code;
	private String shortName;
	private Integer storeType;
	
	private String province;
	private String city;
	private String zone;
	private String address;
	private String manager;
	private String tel;
	private String regionId;
	private Integer channelId;
	private double rebateRate;
	private Long parentId;

	private Date openDate;
	private Date closeDate;
	private Character storeLevel;
	
	private Set<UserModel> users = new LinkedHashSet<UserModel>(0);
	
	public Set<UserModel> getUsers() {
		return users;
	}
	public void setUsers(Set<UserModel> users) {
		this.users = users;
	}
	public String getRegionId() {
		return regionId;
	}
	public void setRegionId(String regionId) {
		this.regionId = regionId;
	}
	public Long getParentId() {
		return parentId;
	}
	public void setParentId(Long parentId) {
		this.parentId = parentId;
	}
	
	public String getShortName() {
		return shortName;
	}
	public void setShortName(String shortName) {
		this.shortName = shortName;
	}
	public Integer getChannelId() {
		return channelId;
	}
	public void setChannelId(Integer channelId) {
		this.channelId = channelId;
	}
	public Character getStoreLevel() {
		return storeLevel;
	}
	public void setStoreLevel(Character storeLevel) {
		this.storeLevel = storeLevel;
	}
	public Integer getStoreType() {
		return storeType;
	}
	public void setStoreType(Integer storeType) {
		this.storeType = storeType;
	}
	public String getCode() {
		return code;
	}
	public void setCode(String code) {
		this.code = code;
	}
	public String getProvince() {
		return province;
	}
	public void setProvince(String province) {
		this.province = province;
	}
	public String getCity() {
		return city;
	}
	public void setCity(String city) {
		this.city = city;
	}
	public String getZone() {
		return zone;
	}
	public void setZone(String zone) {
		this.zone = zone;
	}
	public String getAddress() {
		return address;
	}
	public void setAddress(String address) {
		this.address = address;
	}
	public String getManager() {
		return manager;
	}
	public void setManager(String manager) {
		this.manager = manager;
	}
	public String getTel() {
		return tel;
	}
	public void setTel(String tel) {
		this.tel = tel;
	}
	public String getAreaId() {
		return regionId;
	}
	public void setAreaId(String areaId) {
		this.regionId = areaId;
	}
	
	public double getRebateRate() {
		return rebateRate;
	}
	public void setRebateRate(double rebateRate) {
		this.rebateRate = rebateRate;
	}
	
	public Date getOpenDate() {
		return openDate;
	}
	public void setOpenDate(Date openDate) {
		this.openDate = openDate;
	}
	public Date getCloseDate() {
		return closeDate;
	}
	public void setCloseDate(Date closeDate) {
		this.closeDate = closeDate;
	}
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((address == null) ? 0 : address.hashCode());
		result = prime * result + ((channelId == null) ? 0 : channelId.hashCode());
		result = prime * result + ((city == null) ? 0 : city.hashCode());
		result = prime * result + ((code == null) ? 0 : code.hashCode());
		result = prime * result + ((manager == null) ? 0 : manager.hashCode());
		result = prime * result + ((province == null) ? 0 : province.hashCode());
		result = prime * result + ((regionId == null) ? 0 : regionId.hashCode());
		result = prime * result + ((shortName == null) ? 0 : shortName.hashCode());
		result = prime * result + ((storeLevel == null) ? 0 : storeLevel.hashCode());
		result = prime * result + ((storeType == null) ? 0 : storeType.hashCode());
		result = prime * result + ((tel == null) ? 0 : tel.hashCode());
		result = prime * result + ((zone == null) ? 0 : zone.hashCode());
		return result;
	}
	
	public String toString() {
		return " (id="+id+" name="+name+" code=" + code + ", shortName=" + shortName + ", storeType=" + storeType + ", province=" + province + ", city="
				+ city + ", zone=" + zone + ", address=" + address + ", manager=" + manager + ", tel=" + tel + ", regionId=" + regionId
				+ ", channelId=" + channelId + ", rebateRate=" + rebateRate + ", parentId=" + parentId + ", openDate=" + openDate
				+ ", closeDate=" + closeDate + ", storeLevel=" + storeLevel + ")";
	}

	

	
	
} 
